﻿<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <title>jQuery Animation - fadeTo </title>

    <script type="text/javascript" src="../scripts/jquery-1.8.2.min.js"></script>

    <script type="text/javascript">
        $(function () {
            $("#divPop").animate(
            {
                "opacity": "hide",
                "top": $(window).height() - $("#divPop").height() - $("#divPop").position().top
            }, 2000
            //function () { $("#divPop").hide(); }
            );

            $("#divPop2").animate(
            {
                "opacity": "hide",
                "width": $(window).width() - 100,
                "height": $(window).height() - 100
            },
          5000
          );

        });
    </script>
    <style type="text/css">
        .boxModel {
            width: 200px;
            height: 50px;
            padding: 10px;
            border: solid 5px #FF0000;
            background-color: #acacac;
            text-align:center;
        }
    </style>
</head>
<body>



    <div id="divPop" style="background-color: #f0f0f0; border: solid 1px #000000; width: 300px; height: 100px; position: absolute;">
        <div style="text-align: center;">弹出层</div>
    </div>
    <div id="divPop2" class="boxModel">弹出层2</div>
</body>
</html>
